package com.zxy.supplier_system.server.utils

import java.time.Period

val textWithPeriodChar = mapOf("天" to "D","个月" to "M","年" to "Y")
fun periodFromSpokenLanguage(text:String): Period {
    var newText = text
    textWithPeriodChar.forEach { (t, u) ->
        newText = newText.replace(t,u)
    }
    return Period.parse("P$newText")
}
